<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>

	<form:form method="get" commandName="SubmitOrderModel"
		action="purchaseOrder.htm">
		<table class="containertable">
			<tr>
				<td><form:label path="channel">Channel :</form:label></td>
				<td><form:select path="channel" multiple="false" size="1">
						<form:options items="${channelMap}" />
					</form:select></td>
			</tr>
			<tr>
				<td><form:label path="offerXID">Offer External Id : </form:label></td>
				<td><form:input path="offerXID" colspan="20" /></td>
			</tr>
			<tr>
				<td><form:label path="productQuanity">Product & Quantity : </form:label></td>
				<td><form:textarea class="valuestring2" path="productQuanity"
						colspan="20" /></td>
			</tr>
			<tr>
				<td><form:label path="valueString">Value String : </form:label></td>
				<td><form:textarea class="valuestring2" path="valueString"
						colspan="20" /></td>
			</tr>
			<tr>
				<td></td>
				<td></td>
				<td colspan="2"><input class="containersubmit" type="submit" value="Purchase" name="PurchaseOrder" /></td>
				<td colspan="2"><input class="containersubmit" type="submit" value="Reset" name="ResetInput" /></td>
				<td colspan="2"><input class="containersubmit" type="submit" value="Clear" name="ClearOrderData" /></td>
			</tr>
		</table>

		<div class="datapanel" align="justify"><strong> <span class="orangetitle">Purchase Order History</span> <span class="bodytext"><br /></span> </strong>
			<table class="column-options">
				<tr>
					<th>User External Id</th>
					<th>Offer ID</th>
					<th>User Offer Id</th>
					<th>Product-Quantity</th>
					<th>Type</th>
				</tr>
				<tr></tr>
				<c:forEach var="SubmitOrderView"
					items="${SubmitOrderViewCollection}">
					<tr>
						<td>${SubmitOrderView.userExternalId}</td>
						<td>${SubmitOrderView.offerExternalId}</td>
						<td>${SubmitOrderView.userOfferExternalId}</td>
						<td>${SubmitOrderView.productQuantity}</td>
						<td>${SubmitOrderView.type}</td>
						<td><a href="#" name="Clear" class="button">Clear</a></td>
					</tr>
				</c:forEach>
			</table>
		</div>

	</form:form>
</body>
</html>